﻿<local:DocumentBase x:Class="WPFExcelReport.JLTBB07"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"                     
                    FontSize="16"
                    Loaded="Window_Loaded" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="105">
    <local:DocumentBase.Resources>
        <ucd:PNumConverter  x:Key="pnum"/>
    </local:DocumentBase.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="5*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Grid.ColumnSpan="2">
            <WrapPanel Height="34">
               <Label Content="任务书："    Width="70" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtCO" Width="143" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="1"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="出轴日期从" Height="26" HorizontalAlignment="Left" Margin="10,5,0,0" Name="label3" VerticalAlignment="Top" Width="96" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0" Name="FROM_DATE" VerticalAlignment="Top" Panel.ZIndex="4"
                                    SelectedDateChanged ="FROM_DATE_SelectedDateChanged" Width="126" />
                <Label Content="到" Height="28" HorizontalAlignment="Left" Margin="10,5,0,0" Name="label4" VerticalAlignment="Top" Width="28" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0" Name="END_DATE" VerticalAlignment="Top" Panel.ZIndex="5"
                                    SelectedDateChanged ="END_DATE_SelectedDateChanged" Width="122" />
                <Button Content="查询" Height="33" Margin="10,0,0,0"  Name="btnQuery" Width="96" Panel.ZIndex="6"
                        Click="btnQuery_Click"/>
                <Button Content="导出" Height="33" Margin="10,0,0,0"  Name="btnEXCEL" Width="100" Panel.ZIndex="7"
                        Click="btnEXCEL_Click"/>
            </WrapPanel>
        </StackPanel>
        <DataGrid Grid.Row="1" Margin="0,1,0,0"    
                  FontSize="14"
                              CanUserReorderColumns="True"  
                              CanUserResizeRows="True" CanUserSortColumns="True"                  
                              AutoGenerateColumns="False"   
                              EnableRowVirtualization="True"  
                              RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                              IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                              ItemsSource="{Binding}" x:Name="MasterDg" >
            <DataGrid.Columns>
                <!-- BBBUCHDAT	BBKART	BBKFARBE	MTR	BMKOLLINR	BMVWMPOS	BMRODA	REMARK	BMFDZ	
                BBBAUMKRS	BBBAUMLFD	BMAUFKRS	BMAUFLFD	BMAUFPOS-->
                <DataGridTextColumn Header="出轴日期" Binding="{Binding BBBUCHDAT}" Width="Auto"/>
                <DataGridTextColumn Header="任务书" Binding="{Binding BBKART}" Width="Auto"/>
                <DataGridTextColumn Header="色号" Binding="{Binding BBKFARBE}" Width="Auto"/>
                <DataGridTextColumn Header="米数" Binding="{Binding MTR}" Width="Auto"/>
                <DataGridTextColumn Header="班次" Binding="{Binding BMKOLLINR}" Width="Auto"/>
                <DataGridTextColumn Header="机台" Binding="{Binding BMVWMPOS}" Width="Auto"/>
                <DataGridTextColumn Header="第几轴" Binding="{Binding BMRODA}" Width="Auto"/>
                <DataGridTextColumn Header="备注" Binding="{Binding REMARK}" Width="Auto"/>
                <DataGridTextColumn Header="头份" Binding="{Binding BMFDZ}" Width="Auto"/>
                <DataGridTextColumn Header="轴前缀" Binding="{Binding BBBAUMKRS}" Width="Auto"/>
                <DataGridTextColumn Header="轴号" Binding="{Binding BBBAUMLFD}" Width="Auto"/>
                <DataGridTextColumn Header="前缀" Binding="{Binding BMAUFKRS}" Width="Auto"/>
                <DataGridTextColumn Header="单号" Binding="{Binding BMAUFLFD}" Width="Auto"/>
                <DataGridTextColumn Header="行号" Binding="{Binding BMAUFPOS}" Width="Auto"/>
            </DataGrid.Columns>
        </DataGrid  >        
    </Grid>
</local:DocumentBase>
